home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
action_fishing.swf
/
scripts
/
frame_19
/
PlaceObject2_156_11
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2011-01-13
|
2KB
|
90 lines
onClipEvent(enterFrame){
function reiniciar()
{
aspecto = random(20) + 1;
direccion = random(2) + 1;
if(direccion == 1)
{
this.gotoAndPlay(aspecto);
this._x = random(200) + 610;
sentido = 1;
}
if(direccion == 2)
{
this.gotoAndPlay(aspecto + 20);
this._x = - random(200);
sentido = -1;
}
this._rotation = 0;
pescado = false;
this._y = random(130) + 210;
}
if(_root.pausa == false)
{
if(_root.tiempo <= 0)
{
this.unloadMovie();
}
if(this.hitTest(_root.tipo.raya.anzuelo) && _root.tipo.raya._currentframe > 15)
{
pescado = true;
if(aux == true)
{
if(_root.pesco == 0)
{
_root.pesco = 1;
}
else if(_root.pesco == 1)
{
_root.pesco = 2;
}
}
aux = false;
}
if(pescado == true)
{
this._rotation = 90;
this._y = _root.tipo.raya.anzuelo._y + 120;
this._x = _root.tipo._x + _root.tipo._width / 2;
nn = random(60);
if(nn == 2 && this._y > 270)
{
_root.pesco = 0;
this._rotation = 0;
pescado = false;
}
if(_root.tipo.raya._currentframe == 1)
{
if(_root.pesco >= 2)
{
_root.combo.gotoAndPlay(2);
_root.pesco = 0;
}
_root.pesco = 0;
_root.splash.gotoAndPlay(2);
_root.splash._x = this._x;
mysoundobj = new Sound(this);
mysoundobj.attachSound("pesco");
mysoundobj.setVolume(50);
mysoundobj.start();
_root.puntos += 60;
reiniciar();
pescado = false;
aux = true;
}
}
else
{
if(this._x < -100 and direccion == 1)
{
reiniciar();
}
if(this._x > 800 and direccion == 2)
{
reiniciar();
}
this._x -= velocidad * sentido;
}
}
}